package com.woniu.mapper.healthSystem;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniu.model.healthSystem.dto.AccountDto;
import com.woniu.model.healthSystem.entity.Account;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;

import java.util.List;

/**
 * <p>
 * 职员表 Mapper 接口
 * </p>
 *
 * @author gb
 * @since 2023-10-19
 */
public interface AccountMapper extends BaseMapper<Account> {

    List<AccountDto> findAll();

    /**
     * 添加
     */
    @Insert("INSERT INTO h_account VALUES (null,#{roleName},#{functionalDescription},#{addTime})")
    int addAccount(Account account);


    /**
     * 修改
     */
     int update(Account account);


    /**
     * 删除
     */
    @Delete("DELETE FROM h_account WHERE id=#{id}")
    int deleteById(Long id);


}
